import { createAction } from 'redux-actions';
import * as types from '../constants/ActionTypes';
import * as Api from '../utils/WebAPIUtils.js';
import Tool from '../utils/ToolUtils.js';

const getPushLogAction = createAction(types.FETCH_OPERATE_PUSH_LOG, data => data);

exports.fetchPushLogList = (data) => (dispath) =>
  Tool.post(Api.operatePushLog.query, data, (res) => {
    dispath(getPushLogAction(res));
  });
